<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<ul>
	<li data-name = '火影' data-age = "20">火影</li>
	<li data-name = '第五人格' data-age = "25">第五人格</li>
</ul>
<script type="text/javascript">
	let li = document.querySelectorAll('li')

	for(let i = 0; i<li.length;i++){
		console.log(li[i].getAttribute('data-age'))
		console.log(li[i].getAttribute('data-name'))
	}
</script>
</body>
</html>